package com.wang.system.domain.question;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.wang.common.core.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import org.springframework.data.elasticsearch.annotations.DateFormat;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.time.LocalDateTime;


@TableName("tb_question")
@Setter
@Getter
public class Question extends BaseEntity {

    /*
    使用雪花算法生成id: 在应用层生成唯一id,然后和其他属性一起插入数据库.
     */
    @Schema(description = "题目id")
    @TableId(type = IdType.ASSIGN_ID)
    private Long questionId;

    @Schema(description = "题目标题")
    private String title;

    @Schema(description = "难度")
    private Integer difficulty;

    @Schema(description = "时间限制")
    private Integer timeLimit;

    @Schema(description = "空间限制")
    private Integer spaceLimit;

    @Schema(description = "题目内容")
    private String content;

    @Schema(description = "测试用例")
    private String questionCase;

    @Schema(description = "默认代码")
    private String defaultCode;

    @Schema(description = "主函数")
    private String mainFuc;
}
